/* 
* File:   Error.h
* Author: wolsiefferb
*
* Created on May 1, 2013, 10:20 AM
*/

#ifndef ERROR_H
#define	ERROR_H

#include "ILoggable.h"

namespace logger {

	class Error : public ILoggable {
	public:
		/**
		Error logged when a joystick with the specified name can be found.
		*/
		static const Error kInvalidJoystickName;
		/**
		Error logged when no joystick can be found.
		*/
		static const Error kNoJoystickFound;
		/**
		Error logged if the joystick's data format cannot be set.
		*/
		static const Error kSetJoystickDataFormatFailed;
		/**
		Error logged if the joystick's range cannot be set.
		*/
		static const Error kSetJoystickRangeFailed;
		/**
		Error logged if the joystick does not support absolute axes.
		*/
		static const Error kSetJoystickAxisModeFailed;

		/**
		Creates a new Error with the specified code and message.
		*/
		Error(const int code, const std::wstring&& message);
		Error(const Error& orig);
		virtual ~Error();
		void log(std::wostream& stream) const;

		int getLevel() const;
	private:
		const int mCode;
		const std::wstring mMessage;
	};
}
#endif	/* ERROR_H */

